// 清除浮动
.p-clear-float {
  zoom: 1;
  &:before, &:after { content: ""; display: table; }
  &:after {clear: both;}
}
// 共用阴影
.p-shadow {
  // border: 1px solid #d1dbe5; box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
  border: 1px solid #d1dbe5; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
}
.p-border {
  border: 1px solid #d1dbe5;
}
.p-border-bottom {
  border-bottom: 1px solid #d1dbe5;
}
.p-default-h3 {
  color: #333; font-size: 18px; margin: 0;
}
// 标题
h3.p-blue-h3 {
  color: #20a0ff; font-size: 18px; margin: 18.7px 0;
}
h3.p-gray-h3 {
  color: #D3DCE6; font-size: 18px; margin: 18.7px 0;
}
h3.p-light-h3 {
  color: #999; font-size: 18px; margin: 18.7px 0;
}
h3.p-black-h3 {
  color: #333; font-size: 18px; margin: 18.7px 0;
}
h3.p-group-h3 {
  color: #606266; font-size: 14px; line-height: 14px; font-weight: lighter; margin: 15px;
}
.p-border-title {
  margin-top: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; text-indent: 10px;
  margin-bottom: 15px; color: #222;
}
.p-ornament-title {
  color: #333; font-size: 18px; margin: 18.7px 0; padding-left: 24px; position: relative; line-height: 24px;
  &:before {
    content: ''; display: block; width: 12px; height: 24px; position: absolute; top: 0; left: 0; background: #409EFF;
  }
}
.p-title {
  color: #333; font-size: 32px; margin: 18.7px 0; text-align: center; font-weight: bold;
}

.p-url-hover {
  &:hover {
    color: #58B7FF; cursor: pointer;
  }
}

// 注意说明
.p-notice-explain {
  color: #555; font-size: 13px; line-height: 1.5; position: relative;
  &:after {
    content: "";
  }
}
// 对应
// <div class="label-item-box">
//   <label for="" class="label-item-box-label"></label>
//   <div class="label-item-box-content">
//   </div>
// </div>
.p-label-item-box {
  line-height: 2; display: inline-block;
  zoom: 1;
  &:before, &:after {content: ""; display: table;}
  &:after {clear: both;}
  // label
  & > label.label-item-box-label {
    text-align: right; float: left; vertical-align: middle; font-size: 14px; display: inline-block;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; margin-right: 15px;
  }
  // 内容
  & > div.label-item-box-content {
    display: inline-block; float: left;
  }
}
.p-parallelism { // 对应
  display: table; width: 100%;
  tr {
    min-height: 38px;
    td { padding: 10px; }
  }
}
.p-fl {
  float: left;
}
.p-fl-mr-l {
  float: left; margin-left: 10px;
}
.p-fr {
  float: right;
}
.p-fr-mr-r {
  float: right; margin-right: 10px;
}

.p-flex-one {
  display: flex; display: -webkit-box; flex: 1; -webkit-box-flex: 1;
}
.p-flex-one__child {
  min-height: 100%; width: 100%;
}

.p-table-more {
  width: 35px; text-align: center; cursor: pointer;
  border-radius: 4px;display: inline-block;
  i {color: #ccc;}
  &:hover {
    background: #58B7FF;
    @include transition();
    i {
      color: #fff;
    }
  }
}

.p-link-sign { // 链接标记
  color: #249D7F; font-weight: 600; cursor: pointer;
  &:hover {
    color: #42b983;
  }
}
// 查看链接
.p-lookover-link {
  color: #5478fd; cursor: pointer;
  &:hover { color: #409EFF; }
}

.p-padding-10 { padding: 10px; }
.p-padding-tb-10 { padding: 10px 0; }
.p-padding-25 { padding: 25px; }
.p-mr-tb-10 { margin: 10px 0; }
.p-mr-lr-10 { margin: 0 10px; }
.p-top-space { margin-top: 10px;}
.p-down-space { margin-bottom: 10px;}
.p-left-space { margin-left: 10px;}
.p-right-space { margin-right: 10px;}

.p-max-width {
  max-width: 1280px; margin: 0 auto;
}

// 默认表格
.p-table-default {
  line-height: 1.6; width: 100%; background: #fff; border-radius: 5px; border: 1px solid #eee;
  td, th {padding: 10px 10px; border: 1px solid #eee;}
  th, .th {
    text-align: center; color: #555; background: #f9f9f9; min-width: 80px; white-space: nowrap;
  }
  td {text-align: center; position: relative; color: #999;}
}

// ul-{key:{}}
ul.p-ul {
  line-height: 1.6; margin-bottom: 11px; margin-top: 0; box-sizing: border-box; padding-left: 40px;
  display: block; list-style-type: disc; font-size: 14px;
  li {
    display: list-item; font-size: 15px; line-height: 24px;
    color: #2c3f51;
    // .ul-nesting-key { color: #555; }
    // .ul-nesting-separator { color: #555; }
    // .ul-nesting-content { color: #999; }
    // .ul-nesting-danger { color: #FA5555; }
  }
  ul {
    list-style-type: circle; line-height: 1.6;  margin-bottom: 11px; margin-top: 0; box-sizing: border-box; padding-left: 40px;
    display: block;
  }
}

.p-background-sign {
  padding: 2px 4px; background-color: #f6f6f6; border: none;
  color: #657b83; font-size: 0.9em; white-space: pre-wrap;
}

// 注意、提示、tip等
p.p-notice-tip {
  position: relative;
  padding: 12px 24px 12px 30px;
  margin: 2em 0;
  line-height: 1.6em;
  border-left-width: 4px;
  border-left-style: solid;
  background-color: #f8f8f8;
  border-left-color: #f66;
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
}

// 默认code
code {
  padding: 3px 5px;
  margin: 0 2px;
  background-color: #f8f8f8;
  color: #e96900;
  border-radius: 2px;
  white-space: nowrap;
}

// 代码
pre.p-code-language {
  padding: 15px 20px; line-height: 1.5;
  margin: 0; background-color: #f8f8f8; color: black; text-align: left;
  white-space: pre; word-spacing: normal; word-break: normal; word-wrap: normal;
  tab-size: 4; text-shadow: 0 1px white;
  code.lang-js {
    position: relative; display: block; width: 100%; height: 100%;
    min-height: 1.5em; box-sizing: border-box; white-space: pre;
    max-width: initial; line-height: inherit; padding: 0; margin: 0;
    font-family: "Roboto Mono", Monaco, courier, monospace; font-size: 13px; color: #525252;
    &::after {
      content: 'JS'; position: absolute; top: 0; right: 0; color: #999;
      text-align: right; font-size: 14px; padding: 0 10px;
      line-height: 16px; height: 16px; font-weight: 600;box-sizing: content-box;
    }
    span.line { // 行
      // white-space: normal;
    }
    span.exegesis { // 注释
      color: slategray; font-size: inherit;
    }
    span.keyword { // 关键字
      color: #DD4A68;
    }
    span.punctuation { // 标点符号
      color: #999;
    }
    span.template-string { // 模板字符串
      color: #690;
    }
    span.function { // 方法
      color: #07a;
    }
    span.string { // 字符串
      color: #42b983;
    }
    span.attr { // 属性
      color: #2973b7;
    }
    span.variable { // 变量
    }
  }
}

.p-article-figure { // 文章图解
  display: block; text-align: center; padding-bottom: 30px; position: relative;
  &:before { content: ""; display: inline-block; height: 100%; vertical-align: middle; width: 0; }
  img { max-width: 100%; max-height: 100%; vertical-align: middle; }
  .figure-explain {
    position: absolute; left: 50%; bottom: 0; height: 30px; line-height: 30px; transform: translateX(-50%);
    text-align: center; display: block; border-bottom: 1px solid #ccc;
    // position: absolute; left: 0; bottom: 0; width: 100%; height: 20px; line-height: 20px;
    // text-align: center; display: block;
  }
}

// 禁止换行溢出隐藏
.p-text-ellipsis {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
// 文本标签导航
.p-text-label-nav {
  margin-right: 15px; padding-right: 15px; border-right: 1px solid #333;
  &:last-child {margin-right: 0; padding-right: 0; border-right: 0;}
}

// 共用-组件

// 加载
.p-used-loading {
  display: block; height: 40px; width: 40px; transition: all .5s; z-index: 1;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%);
  &:before, &:after {
    content: "";
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%);
    border-radius: 50%; box-sizing: border-box; background: transparent;
    border-width: 3px; border-style: solid;
    animation: loader 1.4s infinite linear;
  }
  &:before {
    border-color: #999 #999 transparent;
    width: 100%; height: 100%;
  }
  &:after {
    border-color: #999 #999 transparent transparent;
    width: 50%; height: 50%; animation-duration: 1.15s; animation-direction: reverse;
  }
}
@keyframes loader {
  from {
    transform: translate(-50%, -50%) rotate(0deg); -webkit-transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg); -webkit-transform: translate(-50%, -50%) rotate(360deg);
  }
}

// 卡片
.p-card {
  position: relative; display: block; border-radius: 5px; background: #fff;
  // box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
}
